/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50716
Source Host           : localhost:3306
Source Database       : hh

Target Server Type    : MYSQL
Target Server Version : 50716
File Encoding         : 65001

Date: 2018-06-28 17:32:09
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `hh_agent`
-- ----------------------------
DROP TABLE IF EXISTS `hh_agent`;
CREATE TABLE `hh_agent` (
`agent_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '代理商名称' ,
`parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父级id' ,
`parent_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '父级代理名称' ,
`province`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '省' ,
`city`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '市' ,
`county`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '县' ,
`county_id`  bigint(20) NULL DEFAULT 0 COMMENT 'id' ,
`agent_fee`  decimal(10,0) NULL DEFAULT 0 COMMENT '代理费' ,
`balance`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '余额' ,
`mobile`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '电话' ,
`address`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址' ,
`add_time`  int(100) NULL DEFAULT 0 COMMENT '添加时间' ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`status`  int(10) NULL DEFAULT 0 COMMENT '状态' ,
`tax_prove`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '税务登记证明' ,
`business_prove`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '工商登记证明' ,
`card`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证正面' ,
`card_back`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证反面' ,
`bank_card`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '银行卡号' ,
`bank_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户人' ,
`bank`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户行' ,
`bank_branch`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户支行' ,
`bank_branch_id`  varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支行id' ,
PRIMARY KEY (`agent_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=4

;

-- ----------------------------
-- Records of hh_agent
-- ----------------------------
BEGIN;
INSERT INTO `hh_agent` VALUES ('3', '水电费', '3', '水电费', '河北省', '秦皇岛市', '', '130300', '342', '0.00', '234423', '多个', '1529989807', '0', '0', '', '', '', '', '胜多负少的', '34234234', '民生银行', '中国民生银行股份有限公司总行营业部', '045c5d50a954428ca452a19e2b11bf6f');
COMMIT;

-- ----------------------------
-- Table structure for `hh_business`
-- ----------------------------
DROP TABLE IF EXISTS `hh_business`;
CREATE TABLE `hh_business` (
`business_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商家名称' ,
`phone`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '电话' ,
`province`  varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '省' ,
`city`  varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '市' ,
`county`  varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '县' ,
`county_id`  bigint(20) NULL DEFAULT 0 COMMENT 'id' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`status`  int(10) NULL DEFAULT 0 COMMENT '状态' ,
`parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父id' ,
`agent_id`  bigint(20) NULL DEFAULT 0 COMMENT '代理商id' ,
`agent_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '代理商名称' ,
`balance`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '余额' ,
`bank_code`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '银行卡' ,
`bank_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '持卡人' ,
`bank`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '银行名称' ,
`bank_branch`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '银行支行名称' ,
`bank_branch_id`  varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支行id' ,
`card`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证' ,
`card_back`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证反面' ,
`business_prove`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '工商执照' ,
`tax_prove`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '税务登记证明' ,
`last_time`  int(100) NULL DEFAULT 0 COMMENT '到期时间' ,
`service_fee`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '服务费' ,
`dining_back`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '桌牌背景' ,
PRIMARY KEY (`business_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=2

;

-- ----------------------------
-- Records of hh_business
-- ----------------------------
BEGIN;
INSERT INTO `hh_business` VALUES ('1', '水电费', '123123131', '河北省', '秦皇岛市', '山海关区', '130303', '0', '0', '0', '0', '3', '水电费', '0.00', '123123123', '是否', '村镇银行', '六盘水钟山凉都村镇银行股份有限公司凤凰支行', '0000315b89cc4013a87e24bdb1fb241a', '2018/06/26/1a6921ab-1673-482a-a56a-601067585f5f.png', '2018/06/26/556d74ff-28b1-4f21-9070-cc96c72e8590.png', '2018/06/26/19eb43c5-1736-4629-9279-d41cbbc7dd04.jpg', '2018/06/26/798ebea4-b7a1-4ee5-81a8-5909d66f7ce0.jpg', '1529424000', '1231.00', '');
COMMIT;

-- ----------------------------
-- Table structure for `hh_business_record`
-- ----------------------------
DROP TABLE IF EXISTS `hh_business_record`;
CREATE TABLE `hh_business_record` (
`business_record_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`type`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '时间' ,
`to_id`  bigint(20) NULL DEFAULT 0 ,
`to_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`amount`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '金额' ,
`channel`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '渠道' ,
`from_id`  bigint(20) NULL DEFAULT 0 ,
`from_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`note`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`business_id`  bigint(20) NULL DEFAULT 0 ,
`business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
PRIMARY KEY (`business_record_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of hh_business_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `hh_business_user`
-- ----------------------------
DROP TABLE IF EXISTS `hh_business_user`;
CREATE TABLE `hh_business_user` (
`business_user_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称' ,
`phone`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号' ,
`role`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '角色' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '时间' ,
`login_time`  int(10) NULL DEFAULT 0 COMMENT '登录时间' ,
`token`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`status`  int(10) NULL DEFAULT 0 COMMENT '状态1禁用' ,
`business_id`  bigint(20) NULL DEFAULT 0 COMMENT '商户id' ,
`business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商户名称' ,
PRIMARY KEY (`business_user_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=2

;

-- ----------------------------
-- Records of hh_business_user
-- ----------------------------
BEGIN;
INSERT INTO `hh_business_user` VALUES ('1', 'sg   ', '4545', 'employee', '1530005663', '0', '', '0', '1', '水电费');
COMMIT;

-- ----------------------------
-- Table structure for `hh_dining`
-- ----------------------------
DROP TABLE IF EXISTS `hh_dining`;
CREATE TABLE `hh_dining` (
`dining_id`  int(10) NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌牌名称' ,
`sorts`  int(10) NULL DEFAULT 0 COMMENT '排序' ,
`img`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片路径' ,
`business_id`  bigint(20) NULL DEFAULT 0 COMMENT '商家id' ,
`note`  varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`dining_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=5

;

-- ----------------------------
-- Records of hh_dining
-- ----------------------------
BEGIN;
INSERT INTO `hh_dining` VALUES ('3', '343', '34', '/qrcode/2018/06/27/7c613847d729470fbc5b475d340200e9.png', '1', '34344', '1530066588'), ('4', '434', '24', '/qrcode/2018/06/27/ed2256c1b5a345ed8b71629ebcbdfd06.png', '1', '2424', '1530066695');
COMMIT;

-- ----------------------------
-- Table structure for `hh_dining_style`
-- ----------------------------
DROP TABLE IF EXISTS `hh_dining_style`;
CREATE TABLE `hh_dining_style` (
`dining_style_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`url`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路径' ,
`sorts`  int(10) NULL DEFAULT 0 COMMENT '排序' ,
`note`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述' ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称' ,
`type`  int(10) NULL DEFAULT 12345 COMMENT '类型,几个二维码' ,
`code_x`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '二维码x坐标' ,
`code_y`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '二维码y坐标' ,
`width`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '二维码宽度' ,
`height`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '二维码高度' ,
`bus_name_x`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '商家名称x坐标' ,
`bus_name_y`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '商家名称y坐标' ,
`bus_name_color`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字体颜色' ,
`bus_name_font`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字体' ,
`bus_name_bold`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '加粗等' ,
`bus_name_size`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字号' ,
`dining_name_x`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌名X' ,
`dining_name_y`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌名Y坐标' ,
`dining_name_color`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌名颜色' ,
`dining_name_font`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌名字体' ,
`dining_name_bold`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌名粗体等' ,
`dining_name_size`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌名字号大小' ,
`code_xx`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' ,
`code_yy`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' ,
`width_xx`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' ,
`height_yy`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' ,
PRIMARY KEY (`dining_style_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=2

;

-- ----------------------------
-- Records of hh_dining_style
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `hh_food`
-- ----------------------------
DROP TABLE IF EXISTS `hh_food`;
CREATE TABLE `hh_food` (
`food_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
`sorts`  int(10) NULL DEFAULT 0 COMMENT '排序' ,
`status`  int(10) NULL DEFAULT 0 ,
`img`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片' ,
`business_id`  bigint(20) NULL DEFAULT 0 COMMENT '商家id' ,
`food_menu_id`  bigint(20) NULL DEFAULT 0 COMMENT '菜单id' ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`is_multtag`  int(10) NULL DEFAULT 0 COMMENT '是否多规格' ,
`price`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '价格' ,
`food_desc`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述' ,
`start_time`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开始时间' ,
`end_time`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '结束时间' ,
`sub_title`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二级title' ,
PRIMARY KEY (`food_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=7

;

-- ----------------------------
-- Records of hh_food
-- ----------------------------
BEGIN;
INSERT INTO `hh_food` VALUES ('1', 'java软件工程师(兼职)', '0', '333', '0', '2018/06/27/30ed85d9-788f-4c59-ad8e-d94a71607c3e.png', '0', '1', '0', '0', '333.30', '333', '', '', '3sf3333'), ('2', '返回', '0', '45', '1', 'food2018/06/27/835ce086-1965-44af-91c4-b368af1fa435.png', '0', '1', '0', '0', '545.60', '电饭锅', '', '', '45344'), ('3', '的', '1530080606', '1', '0', '', '1', '1', '0', '0', '13.50', '', '', '', '地方'), ('4', '地方', '1530080606', '2', '0', 'sdfasdasdf', '1', '1', '0', '1', '13.33', '', '', '', '方式'), ('5', '的', '1530082154', '1', '0', '', '1', '4', '0', '0', '13.50', '', '', '', '地方'), ('6', '地方', '1530082154', '2', '0', 'sdfasdasdf', '1', '4', '0', '1', '13.33', '', '', '', '方式');
COMMIT;

-- ----------------------------
-- Table structure for `hh_food_menu`
-- ----------------------------
DROP TABLE IF EXISTS `hh_food_menu`;
CREATE TABLE `hh_food_menu` (
`food_menu_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单名称' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
`status`  int(10) NULL DEFAULT 0 COMMENT '状态' ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`img`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路径' ,
`sorts`  int(10) NULL DEFAULT 0 COMMENT '排序' ,
`business_id`  bigint(20) NULL DEFAULT 0 COMMENT '商家id' ,
`menu_desc`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述' ,
`start_time`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开始时间' ,
`end_time`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '结束时间' ,
PRIMARY KEY (`food_menu_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=7

;

-- ----------------------------
-- Records of hh_food_menu
-- ----------------------------
BEGIN;
INSERT INTO `hh_food_menu` VALUES ('1', 'dfsd', '0', '0', '0', '', '33', '1', '', '', ''), ('2', 'dfahahah', '1530070854', '1', '0', '', '23', '1', '', '', ''), ('3', '434', '1530070924', '0', '0', '', '343', '1', '', '', ''), ('4', 'fsfdfdf', '1530070952', '0', '0', '', '33', '1', '', '', ''), ('5', '12', '1530076259', '0', '0', '', '1212', '1', '', '', ''), ('6', '12', '1530076296', '1', '0', '', '1212', '1', '', '', '');
COMMIT;

-- ----------------------------
-- Table structure for `hh_food_tag`
-- ----------------------------
DROP TABLE IF EXISTS `hh_food_tag`;
CREATE TABLE `hh_food_tag` (
`food_tag_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`food_id`  bigint(20) NULL DEFAULT 0 ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称' ,
`price`  decimal(10,2) NULL DEFAULT 0.00 ,
`sort`  int(10) NULL DEFAULT 0 ,
`type`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`add_time`  int(10) NULL DEFAULT 0 ,
PRIMARY KEY (`food_tag_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=5

;

-- ----------------------------
-- Records of hh_food_tag
-- ----------------------------
BEGIN;
INSERT INTO `hh_food_tag` VALUES ('1', '6', '规格', '23.60', '23', '0', '0', '1530082244'), ('2', '4', '发给热天', '53436.64', '34545', '0', '0', '1530082257'), ('3', '4', '543', '45.00', '4', '0', '1', '1530082276'), ('4', '4', 'dcd', '3.00', '3', '0', '0', '1530152329');
COMMIT;

-- ----------------------------
-- Table structure for `hh_open_user`
-- ----------------------------
DROP TABLE IF EXISTS `hh_open_user`;
CREATE TABLE `hh_open_user` (
`open_user_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`photo`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`open_id`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`gender`  varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`age`  int(10) NULL DEFAULT 0 ,
`birthday`  varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`type`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`balance`  decimal(10,2) NULL DEFAULT 0.00 ,
`add_time`  int(10) NULL DEFAULT 0 ,
`province`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`city`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`county`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`order_count`  int(10) NULL DEFAULT 0 ,
PRIMARY KEY (`open_user_id`),
UNIQUE INDEX `u` (`open_id`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=10

;

-- ----------------------------
-- Records of hh_open_user
-- ----------------------------
BEGIN;
INSERT INTO `hh_open_user` VALUES ('1', '', '', 'bedbb395db554bae88128deb74819c77', '', '0', '', '0', '0', '0.00', '1530092487', '', '', '', '0'), ('2', '', '', '86dfa46494934064bb277aed4b291bc4', '', '0', '', '0', '0', '0.00', '1530092729', '', '', '', '0'), ('3', '', '', '1f74fde1f56141a2b6a900f154c3f998', '', '0', '', '0', '0', '0.00', '1530092805', '', '', '', '0'), ('4', '', '', '67eeee0fb84942f6b130e06b38fa28d9', '', '0', '', '0', '0', '0.00', '1530150545', '', '', '', '0'), ('5', '', '', '9c7dced8c6dd49568646b582eb660725', '', '0', '', '0', '0', '0.00', '1530150628', '', '', '', '0'), ('6', '', '', '83b750a306304045897a8a8f49af85ee', '', '0', '', '0', '0', '0.00', '1530154217', '', '', '', '0'), ('7', '', '', '45d8dabd9e034b82a0e5c23239f12625', '', '0', '', '0', '0', '0.00', '1530167800', '', '', '', '0'), ('8', '', '', 'b386cd332ce94ee5a16323b6f678db6f', '', '0', '', '0', '0', '0.00', '1530168053', '', '', '', '3'), ('9', '', '', '735139947f9c421587f1d7c95420b6da', '', '0', '', '0', '0', '0.00', '1530168324', '', '', '', '1');
COMMIT;

-- ----------------------------
-- Table structure for `hh_order`
-- ----------------------------
DROP TABLE IF EXISTS `hh_order`;
CREATE TABLE `hh_order` (
`order_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`user_id`  bigint(20) NULL DEFAULT 0 COMMENT '用户id' ,
`user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '下单人名' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '下单时间' ,
`send_time`  int(10) NULL DEFAULT 0 COMMENT '送货时间' ,
`success_time`  int(10) NULL DEFAULT 0 COMMENT '成功时间' ,
`pay_status`  int(2) NULL DEFAULT 0 COMMENT '支付状态1支付' ,
`order_status`  int(10) NULL DEFAULT 0 COMMENT '订单状态' ,
`send_fee`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '配送费' ,
`send_user_id`  bigint(10) NULL DEFAULT 0 COMMENT '配送人' ,
`send_user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送人名' ,
`total_count`  int(10) NULL DEFAULT 0 COMMENT '总数量' ,
`total_price`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '订单金额' ,
`discount_price`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '折扣金额' ,
`business_id`  bigint(20) NULL DEFAULT 0 COMMENT '商户id' ,
`business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商户名称' ,
`room_id`  bigint(20) NULL DEFAULT 0 COMMENT '房间id' ,
`room`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '房间号' ,
`pay_way`  int(10) NULL DEFAULT 0 COMMENT '支付方式' ,
`refund_count`  int(10) NULL DEFAULT 0 COMMENT '退款数量' ,
`refund_fee`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '退款金额' ,
`business_user_id`  bigint(20) NULL DEFAULT 0 COMMENT '商家用户id' ,
`dining_id`  int(10) NULL DEFAULT NULL ,
`dining_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '桌牌名称' ,
`openid`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
PRIMARY KEY (`order_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=6

;

-- ----------------------------
-- Records of hh_order
-- ----------------------------
BEGIN;
INSERT INTO `hh_order` VALUES ('1', '8', '', '1530168057', '0', '0', '1', '0', '0.00', '0', '', '0', '0.00', '0.00', '1', '水电费', '0', '', '0', '0', '0.00', '0', '3', '343', 'b386cd332ce94ee5a16323b6f678db6f'), ('2', '8', '', '1530168210', '0', '0', '0', '0', '0.00', '0', '', '0', '0.00', '0.00', '1', '水电费', '0', '', '0', '0', '0.00', '0', '3', '343', 'b386cd332ce94ee5a16323b6f678db6f'), ('3', '8', '', '1530168267', '0', '0', '0', '0', '0.00', '0', '', '0', '0.00', '0.00', '1', '水电费', '0', '', '0', '0', '0.00', '0', '3', '343', 'b386cd332ce94ee5a16323b6f678db6f'), ('4', '8', '', '1530168279', '0', '0', '0', '0', '0.00', '0', '', '6', '106895.78', '0.00', '1', '水电费', '0', '', '0', '0', '0.00', '0', '3', '343', 'b386cd332ce94ee5a16323b6f678db6f'), ('5', '9', '', '1530168328', '0', '0', '0', '0', '0.00', '0', '', '6', '106895.78', '0.00', '1', '水电费', '0', '', '0', '0', '0.00', '0', '3', '343', '735139947f9c421587f1d7c95420b6da');
COMMIT;

-- ----------------------------
-- Table structure for `hh_order_food`
-- ----------------------------
DROP TABLE IF EXISTS `hh_order_food`;
CREATE TABLE `hh_order_food` (
`hh_order_food`  bigint(20) NOT NULL AUTO_INCREMENT ,
`food_tag_id`  bigint(20) NULL DEFAULT 0 ,
`food_tag_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`food_id`  bigint(20) NULL DEFAULT 0 ,
`order_id`  bigint(20) NULL DEFAULT 0 ,
`business_id`  bigint(20) NULL DEFAULT NULL ,
`business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`user_id`  bigint(20) NULL DEFAULT NULL ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`price`  decimal(10,2) NULL DEFAULT 0.00 ,
`origin_price`  decimal(10,2) NULL DEFAULT NULL ,
`add_time`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`quantity`  int(10) NULL DEFAULT 0 ,
`refund_quantity`  int(10) NULL DEFAULT 0 ,
PRIMARY KEY (`hh_order_food`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=13

;

-- ----------------------------
-- Records of hh_order_food
-- ----------------------------
BEGIN;
INSERT INTO `hh_order_food` VALUES ('1', '0', '', '3', '1', '1', '水电费', '8', '的', '13.50', null, '1530168057', '0', '0', '0'), ('2', '2', '发给热天', '4', '1', '1', '水电费', '8', '地方', '13.33', null, '1530168057', '0', '0', '0'), ('3', '4', 'dcd', '4', '1', '1', '水电费', '8', '地方', '13.33', null, '1530168057', '0', '0', '0'), ('4', '0', '', '3', '2', '1', '水电费', '8', '的', '13.50', null, '1530168210', '0', '0', '0'), ('5', '2', '发给热天', '4', '2', '1', '水电费', '8', '地方', '13.33', null, '1530168210', '0', '0', '0'), ('6', '4', 'dcd', '4', '2', '1', '水电费', '8', '地方', '13.33', null, '1530168210', '0', '0', '0'), ('7', '0', '', '3', '4', '1', '水电费', '8', '的', '13.50', null, '1530168279', '0', '1', '0'), ('8', '2', '发给热天', '4', '4', '1', '水电费', '8', '地方', '13.33', null, '1530168279', '0', '2', '0'), ('9', '4', 'dcd', '4', '4', '1', '水电费', '8', '地方', '13.33', null, '1530168279', '0', '3', '0'), ('10', '0', '', '3', '5', '1', '水电费', '9', '的', '13.50', null, '1530168328', '0', '1', '0'), ('11', '2', '发给热天', '4', '5', '1', '水电费', '9', '地方', '13.33', null, '1530168328', '0', '2', '0'), ('12', '4', 'dcd', '4', '5', '1', '水电费', '9', '地方', '13.33', null, '1530168328', '0', '3', '0');
COMMIT;

-- ----------------------------
-- Table structure for `hh_pay_config`
-- ----------------------------
DROP TABLE IF EXISTS `hh_pay_config`;
CREATE TABLE `hh_pay_config` (
`business_id`  bigint(20) NOT NULL ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`wx_model`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '微信支付模式' ,
`ali_model`  varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付宝支付模式' ,
`wx_app_id`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`wx_sercret`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`wx_service_mch_id`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`wx_mch_id`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`wx_partnerkey`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`ali_app_id`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`ali_public_key`  varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`ali_mch_private_key`  varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`add_time`  int(11) NULL DEFAULT 0 COMMENT '时间' ,
PRIMARY KEY (`business_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci

;

-- ----------------------------
-- Records of hh_pay_config
-- ----------------------------
BEGIN;
INSERT INTO `hh_pay_config` VALUES ('2', '0', 'platform', 'platform', '54', '456', '64', '456', '456', '456', '456', '45646', '0');
COMMIT;

-- ----------------------------
-- Table structure for `hh_pay_log`
-- ----------------------------
DROP TABLE IF EXISTS `hh_pay_log`;
CREATE TABLE `hh_pay_log` (
`pay_log_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`user_id`  bigint(20) NULL DEFAULT 0 COMMENT '用户id' ,
`user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户名称' ,
`order_id`  bigint(20) NULL DEFAULT 0 COMMENT '订单id' ,
`status`  int(10) NULL DEFAULT 0 COMMENT '状态' ,
`wx_order`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '微信订单' ,
`ali_order`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '阿里订单' ,
`note`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '说明' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`money`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '金额' ,
`food_count`  int(10) NULL DEFAULT 0 COMMENT '数量' ,
PRIMARY KEY (`pay_log_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of hh_pay_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `hh_pay_record`
-- ----------------------------
DROP TABLE IF EXISTS `hh_pay_record`;
CREATE TABLE `hh_pay_record` (
`pay_record_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`order_id`  bigint(20) NULL DEFAULT 0 COMMENT '订单id' ,
`user_id`  bigint(20) NULL DEFAULT NULL ,
`user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '起始用户' ,
`to_user_id`  bigint(20) NULL DEFAULT 0 COMMENT '用户id' ,
`to_user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL ,
`trans_type`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '交易类型' ,
`money`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '钱' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
`notes`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注' ,
PRIMARY KEY (`pay_record_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of hh_pay_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `hh_user`
-- ----------------------------
DROP TABLE IF EXISTS `hh_user`;
CREATE TABLE `hh_user` (
`user_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称' ,
`user_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户名' ,
`pwd`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码' ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '添加时间' ,
`type`  int(10) NULL DEFAULT 0 COMMENT '类型' ,
`status`  int(10) NULL DEFAULT 0 COMMENT '状态0正常' ,
`role`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '角色' ,
`business_id`  bigint(20) NULL DEFAULT 0 COMMENT '商户id' ,
`business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商户名称' ,
`contact_person`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系人' ,
`province`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '省' ,
`city`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '市' ,
`county`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '县' ,
`county_id`  bigint(20) NULL DEFAULT 0 COMMENT '县id' ,
PRIMARY KEY (`user_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of hh_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `hh_withdraw`
-- ----------------------------
DROP TABLE IF EXISTS `hh_withdraw`;
CREATE TABLE `hh_withdraw` (
`withdraw_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`business_id`  bigint(20) NULL DEFAULT 0 ,
`business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商家名称' ,
`user_business_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`user_business_id`  bigint(20) NULL DEFAULT 0 ,
`withdraw_amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '提现金额' ,
`estimate_amount`  decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '预计到账金额' ,
`poundage`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '手续费' ,
`amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '实际到账金额' ,
`service_amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '服务费' ,
`bank`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`bank_branch`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`bank_code`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '银行卡' ,
`bank_user`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户人' ,
`type`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '时间' ,
`sart_time`  int(10) NULL DEFAULT 0 ,
`end_time`  int(10) NULL DEFAULT 0 ,
PRIMARY KEY (`withdraw_id`, `estimate_amount`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of hh_withdraw
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `hh_withdraw_agent`
-- ----------------------------
DROP TABLE IF EXISTS `hh_withdraw_agent`;
CREATE TABLE `hh_withdraw_agent` (
`withdraw_agent_id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`agent_id`  bigint(20) NULL DEFAULT 0 ,
`agent_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商家名称' ,
`user_agent_id`  bigint(20) NULL DEFAULT 0 ,
`user_agent_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL ,
`withdraw_amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '提现金额' ,
`estimate_amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '预计到账金额' ,
`poundage`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '手续费' ,
`amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '实际到账金额' ,
`service_amount`  decimal(10,2) NULL DEFAULT 0.00 COMMENT '服务费' ,
`bank`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`bank_branch`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' ,
`bank_code`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '银行卡' ,
`bank_user`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户人' ,
`type`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`add_time`  int(10) NULL DEFAULT 0 COMMENT '时间' ,
`sart_time`  int(10) NULL DEFAULT 0 ,
`end_time`  int(10) NULL DEFAULT 0 ,
PRIMARY KEY (`withdraw_agent_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of hh_withdraw_agent
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `sys_dictionaries`
-- ----------------------------
DROP TABLE IF EXISTS `sys_dictionaries`;
CREATE TABLE `sys_dictionaries` (
`dictionaries_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '名称' ,
`parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父级id' ,
`parent_code`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`dic_code`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字点编码' ,
`add_time`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
PRIMARY KEY (`dictionaries_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of sys_dictionaries
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`menu_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`url`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`path`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`add_time`  int(10) NULL DEFAULT 0 ,
`status`  int(10) NULL DEFAULT 0 ,
`note`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '说明' ,
`sort`  int(10) NULL DEFAULT 0 ,
`parent_id`  bigint(20) NULL DEFAULT 0 ,
`level`  int(20) NULL DEFAULT 0 COMMENT '级别' ,
PRIMARY KEY (`menu_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=49

;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES ('16', '系统管理', '#', '', '0', '0', '', '0', '0', '1'), ('17', '菜单管理', '/sysMenu/toList.do', '', '0', '0', '', '1', '16', '2'), ('18', '字典管理', '/sysDictionaries/toList.do', '', '0', '0', '', '2', '16', '2'), ('19', '用户管理', '/sysUser/toList.do', '', '0', '0', '', '3', '16', '2'), ('20', '角色管理', '/sysRole/toList.do', '', '0', '0', '', '4', '16', '2'), ('29', '配置管理', '#', '', '0', '0', '', '1', '0', '1'), ('30', '城市列表', '/hhCity/toList.do', '', '0', '0', '', '1', '29', '2'), ('34', '代理商管理', '#', '', '0', '0', '', '2', '0', '1'), ('35', '代理商列表', '/hhAgent/toList.do', '', '0', '0', '', '1', '34', '2'), ('36', '银行管理', '/hhBank/toList', '', '0', '0', '', '2', '29', '2'), ('37', '银行支行信息', '/hhBankBranch/toList.do', '', '0', '0', '', '3', '29', '2'), ('38', '商家管理', '#', '', '0', '0', '', '4', '0', '1'), ('39', '商家列表', '/hhBusiness/toList.do', '', '0', '0', '', '1', '38', '2'), ('40', '数据维护', '/hhBusiness/infoList.do', '', '0', '0', '', '2', '38', '2'), ('41', '商家订单', '/hhOrder/toList.do', '', '0', '0', '', '3', '38', '2'), ('42', '提现管理', '#', '', '0', '0', '', '5', '0', '1'), ('43', '全部提现', '/hhWithdraw/toList.do', '', '0', '0', '', '1', '42', '2'), ('44', '提现中', '/hhWithdraw/toListing.do', '', '0', '0', '', '2', '42', '2'), ('45', '代理商提现', '/hhWithdrawAgent/toList.do', '', '0', '0', '', '3', '42', '2'), ('46', '提现记录', '/hhBusiness/toWithdrawList.do', '', '0', '0', '', '4', '38', '2'), ('47', '交易明细', '/hhBusinessRecord/toList.do', '', '0', '0', '', '5', '38', '2'), ('48', '样式列表', '/hhDiningStyle/toList.do', '', '0', '0', '', '2', '29', '2');
COMMIT;

-- ----------------------------
-- Table structure for `sys_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`role_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '角色名称' ,
`role_code`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '角色编码' ,
`status`  int(10) NULL DEFAULT 0 ,
`type`  int(10) NULL DEFAULT 0 ,
`add_time`  int(10) NULL DEFAULT 0 ,
`menu_rights`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' ,
`add_rights`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '添加权限' ,
`eidt_rights`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '修改权限' ,
`del_rights`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除权限' ,
`select_rights`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '查询权限' ,
PRIMARY KEY (`role_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=3

;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES ('1', '管理员', 'admin', '0', '0', '0', '562934386196480', '0', '0', '0', '0'), ('2', '代理商', 'agent', '0', '0', '0', '15411970048', '0', '0', '0', '0');
COMMIT;

-- ----------------------------
-- Table structure for `sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`user_id`  bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT ,
`user_name`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '登录账户' ,
`name`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '昵称' ,
`pwd`  varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`login_ip`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`login_time`  int(10) NULL DEFAULT 0 COMMENT '最后一次登录时间' ,
`login_count`  int(10) NULL DEFAULT 0 COMMENT '登录次数' ,
`phone`  varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机' ,
`school_id`  varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '学校id' ,
`role`  varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '角色' ,
`note`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' ,
`status`  int(10) NULL DEFAULT 0 ,
`type`  int(10) NULL DEFAULT 0 ,
`add_time`  int(10) NULL DEFAULT 0 ,
`role_id`  bigint(20) NULL DEFAULT 0 COMMENT '角色id' ,
`agent_id`  bigint(20) NULL DEFAULT 0 COMMENT '代理商id' ,
PRIMARY KEY (`user_id`),
UNIQUE INDEX `username` (`user_name`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=14

;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES ('1', 'admins', 'dizhu', '21232F297A57A5A743894A0E4A801FC3', '', '1528786123', '71', '', '', '管理员', '', '0', '0', '11', '1', '0'), ('2', 'duobao', 'dd', '202CB962AC59075B964B07152D234B70', '', '1528334841', '56', '45', '', '管理员', '', '0', '0', '0', '1', '0'), ('3', 'admin', '李', 'C4CA4238A0B923820DCC509A6F75849B', '', '1530178254', '141', '', '', '管理员', '', '0', '0', '0', '1', '0'), ('5', 'ffgggg', 'ff', '633DE4B0C14CA52EA2432A3C8A5C4C31', '', '0', '0', '123', '', '代理商', '', '0', '0', '1528794174', '2', '2'), ('6', 'duobao33', '33', '310DCBBF4CCE62F762A2AAA148D556BD', '', '0', '0', '333', '', '', '', '0', '0', '1528794667', '0', '0'), ('7', 'duobaorr', '33', '4B43B0AEE35624CD95B910189B3DC231', '', '0', '0', '', '', '代理商', '', '0', '0', '1528794979', '0', '2'), ('8', 'school', 'trt', 'C4CA4238A0B923820DCC509A6F75849B', '', '1528975430', '3', '123', '0CBAD69ECD4F4B1DBD305370378F61E2', '学校管理员', '', '0', '0', '1528797243', '0', '0'), ('11', 's', '22', 'C4CA4238A0B923820DCC509A6F75849B', '', '1528975470', '8', '123', '3B07894F393049738D2F4B0595244E80', '学校管理员', '', '0', '0', '1528870338', '3', '0'), ('12', 'werwre', '23424', '71A5C0514AB83382D98154E5A5F9D813', '', '0', '0', '3242', '', '代理商', '', '1', '0', '1529992953', '2', '3'), ('13', '水电费水电费', 'sdfsfd', '424CA9D51649B47DC935FC63552036EE', '', '0', '0', '1213', '', '代理商', '', '0', '0', '1529993251', '2', '3');
COMMIT;

-- ----------------------------
-- Auto increment value for `hh_agent`
-- ----------------------------
ALTER TABLE `hh_agent` AUTO_INCREMENT=4;

-- ----------------------------
-- Auto increment value for `hh_business`
-- ----------------------------
ALTER TABLE `hh_business` AUTO_INCREMENT=2;

-- ----------------------------
-- Auto increment value for `hh_business_record`
-- ----------------------------
ALTER TABLE `hh_business_record` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `hh_business_user`
-- ----------------------------
ALTER TABLE `hh_business_user` AUTO_INCREMENT=2;

-- ----------------------------
-- Auto increment value for `hh_dining`
-- ----------------------------
ALTER TABLE `hh_dining` AUTO_INCREMENT=5;

-- ----------------------------
-- Auto increment value for `hh_dining_style`
-- ----------------------------
ALTER TABLE `hh_dining_style` AUTO_INCREMENT=2;

-- ----------------------------
-- Auto increment value for `hh_food`
-- ----------------------------
ALTER TABLE `hh_food` AUTO_INCREMENT=7;

-- ----------------------------
-- Auto increment value for `hh_food_menu`
-- ----------------------------
ALTER TABLE `hh_food_menu` AUTO_INCREMENT=7;

-- ----------------------------
-- Auto increment value for `hh_food_tag`
-- ----------------------------
ALTER TABLE `hh_food_tag` AUTO_INCREMENT=5;

-- ----------------------------
-- Auto increment value for `hh_open_user`
-- ----------------------------
ALTER TABLE `hh_open_user` AUTO_INCREMENT=10;

-- ----------------------------
-- Auto increment value for `hh_order`
-- ----------------------------
ALTER TABLE `hh_order` AUTO_INCREMENT=6;

-- ----------------------------
-- Auto increment value for `hh_order_food`
-- ----------------------------
ALTER TABLE `hh_order_food` AUTO_INCREMENT=13;

-- ----------------------------
-- Auto increment value for `hh_pay_log`
-- ----------------------------
ALTER TABLE `hh_pay_log` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `hh_pay_record`
-- ----------------------------
ALTER TABLE `hh_pay_record` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `hh_user`
-- ----------------------------
ALTER TABLE `hh_user` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `hh_withdraw`
-- ----------------------------
ALTER TABLE `hh_withdraw` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `hh_withdraw_agent`
-- ----------------------------
ALTER TABLE `hh_withdraw_agent` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `sys_dictionaries`
-- ----------------------------
ALTER TABLE `sys_dictionaries` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `sys_menu`
-- ----------------------------
ALTER TABLE `sys_menu` AUTO_INCREMENT=49;

-- ----------------------------
-- Auto increment value for `sys_role`
-- ----------------------------
ALTER TABLE `sys_role` AUTO_INCREMENT=3;

-- ----------------------------
-- Auto increment value for `sys_user`
-- ----------------------------
ALTER TABLE `sys_user` AUTO_INCREMENT=14;
